<template>
  <div class="bg-box-2">
    <div class="bg-box-2-text">
      <span>{{ title || '测试' }}</span>
    </div>
    <div class="bg-box-2-number" style="align-items: center;">
      <span class="color">{{ number || '332' }}</span>
      <span class="unit">{{ unit || '家' }}</span>
    </div>
  </div>
</template>
<script>
  export default {
    props:['title','number','unit']
  }
</script>
<style lang="scss">
.bg-box-2 {
  width: 258px;
  height: 48px;
  opacity: 1;

  /* 自动布局 */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 12px 24px;
  align-self: stretch;

  background: linear-gradient(
    90deg,
    rgba(59, 214, 172, 0.14) 0%,
    rgba(59, 214, 172, 0) 100%
  );

  z-index: 0;
  align-items: center;

  .bg-box-2-number .color {
    font-family: DIN;
    font-size: 22px;
    font-weight: bold;
    line-height: 22px;
    letter-spacing: 0em;

    background: linear-gradient(180deg, #d5fff5 15%, #8cd9c5 84%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    z-index: 0;
  }
  .bg-box-2-number .unit {
    opacity: 0.8;
    font-family: 思源黑体;
    font-size: 14px;
    font-weight: 350;
    line-height: 14px;
    letter-spacing: 0em;

    /* 纯白 */
    color: #ffffff;

    z-index: 1;
    margin-left: 8px;
  }
  .bg-box-2-text span {
    height: 24px;
    opacity: 1;

    font-family: 思源黑体;
    font-size: 16px;
    font-weight: normal;
    line-height: normal;
    text-transform: uppercase;
    letter-spacing: 1px;

    font-variation-settings: 'opsz' auto;
    font-feature-settings: 'kern' on;
    /* 文字白 */
    color: #ffffff;

    z-index: 0;
  }
}
</style>
